﻿<%@ Page Title="Publishing" Language="C#" MasterPageFile="~/Posts/Posts.master" AutoEventWireup="true"
    CodeFile="Publish.aspx.cs" Inherits="Posts_Publish" %>

<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc2" %>
<asp:Content ID="Content3" ContentPlaceHolderID="phMain" runat="Server">
    <uc2:Header ID="ucHeader" runat="server" />
    <asp:Panel ID="tabPage" CssClass="tabPage clearfix" runat="server">
        <asp:Panel ID="pnlActions" CssClass="actions clearfix" runat="server">
            <div class="floatRight">
                <acms:ActionButton ID="lnkMark" Icon="Ready" ToolTip="Mark as Ready for Publishing" Text="Mark as Ready for Publishing" runat="server" OnClick="lnkMark_Click" />
                <acms:ActionButton ID="lnkUnMark" Icon="Cancel" Text="Mark as Not Ready for Publishing" ToolTip="Mark as Not Ready for Publishing" runat="server" OnClick="lnkUnMark_Click" />
                <acms:ActionButton ID="lnkRetire" Text="Retire" ToolTip="Retire" Icon="Clear" runat="server" OnClick="lnkRetire_Click" />
                <acms:ActionButton ID="lnkSave" Text="Save" ToolTip="Save" Icon="Save" runat="server" />
                <acms:ActionButton ID="lnkCancel" Text="Cancel" ToolTip="Cancel" Icon="Cancel" runat="server" OnClick="lnkCancel_Click" />
                <acms:ActionButton ID="lnkEdit" Text="Edit" ToolTip="Edit" Icon="Edit" runat="server" OnClick="lnkEdit_Click" />
                <acms:ActionButton ID="lnkDelete" Visible="false" Text="Delete" ToolTip="Delete" Icon="Clear" OnClientClick="return confirm('Are you sure');" OnClick="lnkDelete_Click" runat="server" />
            </div>
        </asp:Panel>
    
        <asp:Panel ID="pnlPublished" runat="server" OnDataBinding="pnlPublished_DataBinding">
        
        
        
        <asp:DetailsView ID="dvPublishingDates" DataSourceID="dsCurrentPost" AutoGenerateRows="false"
            runat="server">
            <Fields>
                <acms:DateTimeField HeaderText="Published From" Required="true" DataField="PublishFrom" />
                <acms:DateTimeField HeaderText="Published To" DataField="PublishTo" />
            </Fields>
        </asp:DetailsView>
    </asp:Panel>
    
    <asp:Panel ID="pnlPending" runat="server" OnDataBinding="pnlPending_DataBinding">
        <div class="ImportantText">
            <p id="pNotRequired" runat="server">
                This is a pending post that does not yet require publishing.</p>
            <p id="pMarked" runat="server">
                This is a pending post that is marked ready for publishing.</p>
            <p id="pNotMarked" runat="server">
                This is a pending post that has not been marked ready for publishing.</p>
        </div>
        <asp:Panel ID="pnlPublishImmedatly" CssClass="formPublish" runat="server" Visible="false">
            <div class="header clearfix">
                <h3>Publish Immediately</h3>
            </div>
            <div class="adminDisplayContent">
                <ul>
                    <li class="clearfix">
                        <asp:LinkButton ID="lnkPublishNow" CssClass="actionBtn abPublish" runat="server" OnClick="lnkPublishNow_Click" >
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish Now</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                    </li>
                    <li class="clearfix">
                        <asp:LinkButton ID="lnkPublishNowChildren" CssClass="actionBtn abPublish" OnClick="lnkPublishNowChildren_Click" runat="server" >
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish Now Including All Children</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                    </li>
                    <li class="clearfix">
                    <asp:LinkButton ID="lnkPublishNowChildrenMarked" CssClass="actionBtn abPublish" OnClick="lnkPublishNowChildrenMarked_Click" runat="server" >
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish Including Children Marked Ready For Publishing</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                    </li>
                </ul>
            </div>
        </asp:Panel>
        
        <asp:Panel ID="pnlPublishDates" CssClass="formPublish" runat="server" Visible="false">
            <div class="header clearfix">
                <h3>Publish with Start and or End Dates</h3>
            </div>
            <div class="adminDisplayContent">
                <ul>
                    <li>
                        <asp:Label ID="Label1" AssociatedControlID="dtFrom" Text="Publish From" runat="server" />
                        <telerik:RadDateTimePicker ID="dtFrom" runat="server">
                        </telerik:RadDateTimePicker>
                    
                        <asp:Label ID="Label2" AssociatedControlID="dtTo" Text="Publish To" runat="server" />
                        <telerik:RadDateTimePicker ID="dtTo" runat="server" />
                    </li>
                    
                    
                    <li class="clearfix">
                        <asp:LinkButton ID="lnkPublishDates" CssClass="actionBtn abPublish" OnClick="lnkPublishDates_Click" runat="server">
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                        <%--<asp:Button ID="Button1" Text="Publish" runat="server" OnClick="lnkPublishDates_Click" />--%>
                    </li>
                        
                    <li class="clearfix">
                        <asp:LinkButton ID="lnkPublishDatesChildren" CssClass="actionBtn abPublish" OnClick="lnkPublishDatesChildren_Click" runat="server">
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish Including All Children</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                        <%--<asp:Button ID="lnkPublishDatesChildren" Text="Publish Including All Children" runat="server"
                            OnClick="lnkPublishDatesChildren_Click" />--%>
                    </li>
                    <li class="clearfix">
                        <asp:LinkButton ID="lnkPublishDatesChildrenMarked" CssClass="actionBtn abPublish" OnClick="lnkPublishDatesChildrenMarked_Click" runat="server">
                            <div class="tl">
                                <div class="tr">
                                    <div class="bl">
                                        <div class="br">
                                            <span>Publish Including Children Marked Ready For Publishing</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:LinkButton>
                        <%--<asp:Button ID="lnkPublishDatesChildrenMarked" Text="Publish Including Children Marked Ready For Publishing"
                            runat="server" OnClick="lnkPublishDatesChildrenMarked_Click" />--%>
                    </li>
                </ul>
            </div>    
        </asp:Panel>
    </asp:Panel>
    
    <asp:Panel ID="pnlRetire" runat="server">
        <h2>Retire Post</h2>
        <ul>
            <li class=clearfix">
                <asp:LinkButton ID="btnRetireThis" CssClass="actionBtn abClear" OnClientClick='return confirm("Are you sure you want to retire this version");'
                    runat="server" OnClick="btnRetireThis_Click" runat="server">
                    <div class="tl">
                        <div class="tr">
                            <div class="bl">
                                <div class="br">
                                    <span>Retire this version now</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:LinkButton>
                <%--<asp:Button ID="btnRetireThis" Text="Retire this version now" OnClientClick='return confirm("Are you sure you want to retire this version");'
                    runat="server" OnClick="btnRetireThis_Click" />--%>
            </li>
            <li class=clearfix">
                <asp:LinkButton ID="btnRetireThisAndPending" CssClass="actionBtn abClear" OnClientClick='return confirm("Are you sure you want to retire this version and all other versions");' runat="server">
                    <div class="tl">
                        <div class="tr">
                            <div class="bl">
                                <div class="br">
                                    <span>Retire this and all other versions including pending</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:LinkButton>
                
                <%--<asp:Button ID="btnRetireThisAndPending" Text="Retire this version and all other versions including pending versions"
                    OnClientClick='return confirm("Are you sure you want to retire this version and all other versions");'
                    runat="server" />--%>
                    
            </li>
        </ul>
    </asp:Panel>
    </asp:Panel>
    <acms:PostDataSource ID="dsCurrentPost" runat="server" OnSelectData="dsCurrentPost_SelectData" />

</asp:Content>
